package com.supermap.localization.impl;

import java.util.ArrayList;
import java.util.List;

import org.apache.oro.text.regex.MalformedPatternException;

import com.supermap.localization.util.ConfigsUtil;

public class ExtractManager {

    public static List<String> extract(String str) throws MalformedPatternException {
        List<String> results = new ArrayList<>();
        List<Extracter> extracters = ConfigsUtil.extracters;
        for (int i = 0; i < extracters.size(); i++) {
            results.addAll(extracters.get(i).extract(str));
            str = extracters.get(i).getStringAfterExtract(str);
        }
        return results;
    }
}
